<!--
 * @Author: 13212657520 10828485+zhaosieve@user.noreply.gitee.com~
 * @Date: 2022-05-26 15:29:45
 * @LastEditors: 13212657520 10828485+zhaosieve@user.noreply.gitee.com~
 * @LastEditTime: 2022-05-26 17:47:15
 * @FilePath: \vue-2202\src\views\news\newsinnfo\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="newsinfo">
    <van-cell-group>
      <van-cell
        :title="getNewsInfoList.zhaiyao"
        :value="`阅读${getNewsInfoList.click}次`"
      />
      <van-cell title="" :label="getNewsInfoList.content" />
    </van-cell-group>
    <Comment :id="id"></Comment>
  </div>
</template>
<script>
import { newsListInfo } from "@/api";
import Comment from "@/components/Comment";
export default {
  props: ["id"],
  data() {
    return { getNewsInfoList: {} };
  },
  methods: {
    async getNewsInfo() {
      const res = await newsListInfo(this.id);
      this.getNewsInfoList = res.data.message;
    },
  },
  components: { Comment },
  created() {
    this.getNewsInfo();
  },
};
</script>
<style lang="scss" scoped>
.newsinfo {
  .van-cell__title {
    font-size: 24px;
    font-weight: 600;
  }
  .van-cell__value {
    color: rgb(181, 36, 41);
  }
  .van-cell__label {
    font-size: 18px;
    font-weight: 450;
    text-indent: 36px;
  }
}
</style>
